
import React from "react";

import PropTypes from 'prop-types'

import { ZtWrap } from "./ZhuanTiStyled"







const ZhuanTi = (props) => {
    return (
      <ZtWrap>
      <div>
      <h1>教学专题</h1>
      <span>查看全部</span>
      </div>
      <ul>
      {
        props.list.length > 0 && props.list.map((value,index) =>{
          return(
            <li
            key={value.id+"_"+index}
            >
            <div>
              <img src={value.img} alt="" />
            </div>
            <div>
          <h2>{value.name}</h2>
          <div><span>{value.all_click}</span>浏览 <span>{value.favorites}</span>收藏</div>
            </div>
          </li>
          )
        } )
      }
      </ul>
      </ZtWrap>
    )
}

ZhuanTi.propTypes = {
  list:PropTypes.array
}

export default ZhuanTi

